USE [Tibet]
GO

/****** Object:  StoredProcedure [dbo].[insertarPerfilReglaRegla]    Script Date: 06/23/2011 18:53:24 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[insertarPerfilReglaRegla] 
	-- Add the parameters for the stored procedure here
	@Nombre_Perfil_Regla Varchar(100),
	@IdRegla int
AS
BEGIN
	
    -- Insert statements for procedure here
	INSERT INTO [dbo].[Perfil_Regla_Regla]
	(Fk_PerfilRegla_idPerfilRegla,Fk_Regla_idRegla)
	VALUES((select idPerfilRegla 
		from [dbo].[Perfil_Regla]
		where NombrePerfilRegla = @Nombre_Perfil_Regla),
		
		  (select idRegla
		from [dbo].[Regla]
		where idRegla = @IdRegla) )
	
END


GO

